home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / noweb / src / shell / nodefs < prev    next >
Text File  |  1995-02-24  |  724b  |  29 lines

  1. #!/bin/sh
  2. #
  3. # Copyright 1993 by Norman Ramsey.  All rights reserved.
  4. # See file COPYRIGHT for more information.
  5. LIB=|LIBDIR|
  6. case $1 in 
  7.   -auto|-autodefs) 
  8.     newfilter="$LIB/autodefs.$2" ; shift ; shift
  9.     $LIB/markup $* | $newfilter | sed -n 's/^@index defn //p'
  10.     ;;
  11.   -showauto|-showautodefs)
  12.     foundautodefs=
  13.     for i in $LIB/autodefs.*; do
  14.       if [ -r $i ]; then
  15.         echo "This `basename $0` supports -autodefs $i" | 
  16.                             sed "s@$LIB/autodefs\.@@" 1>&2
  17.         foundautodefs=$i
  18.       fi
  19.     done
  20.     if [ -z "$foundautodefs" ]; then
  21.       echo "This `basename $0` does not support -autodefs"
  22.     fi
  23.     ;;
  24.   *)
  25.     $LIB/markup $* | sed -n 's/^@index defn //p'
  26.     ;;
  27. esac
  28. exit $?
  29.